<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>支持的字符编码</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mbstring.http.html">« HTTP 输入和输出</a></li>
      <li style="float: right;"><a href="mbstring.overload.html">函数重载功能 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.mbstring.html">多字节字符串</a></li>
    <li>支持的字符编码</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mbstring.supported-encodings" class="chapter">
 <h1>支持的字符编码</h1>

 <p class="simpara">
  当前 <code class="literal">mbstring</code> 模块支持以下的字符编码。这些字符编码中的任意一个都能指定到 <code class="literal">mbstring</code> 函数中的 <code class="literal">encoding</code> 参数。
 </p>
 <p class="para">
  该 PHP 扩展支持的字符编码有以下几种：
 </p>
 <ul class="itemizedlist">
  <li class="listitem"><span class="simpara">UCS-4*</span></li>
  <li class="listitem"><span class="simpara">UCS-4BE</span></li>
  <li class="listitem"><span class="simpara">UCS-4LE*</span></li>
  <li class="listitem"><span class="simpara">UCS-2</span></li>
  <li class="listitem"><span class="simpara">UCS-2BE</span></li>
  <li class="listitem"><span class="simpara">UCS-2LE</span></li>
  <li class="listitem"><span class="simpara">UTF-32*</span></li>
  <li class="listitem"><span class="simpara">UTF-32BE*</span></li>
  <li class="listitem"><span class="simpara">UTF-32LE*</span></li>
  <li class="listitem"><span class="simpara">UTF-16*</span></li>
  <li class="listitem"><span class="simpara">UTF-16BE*</span></li>
  <li class="listitem"><span class="simpara">UTF-16LE*</span></li>
  <li class="listitem"><span class="simpara">UTF-7</span></li>
  <li class="listitem"><span class="simpara">UTF7-IMAP</span></li>
  <li class="listitem"><span class="simpara">UTF-8*</span></li>
  <li class="listitem"><span class="simpara">ASCII*</span></li>
  <li class="listitem"><span class="simpara">EUC-JP*</span></li>
  <li class="listitem"><span class="simpara">SJIS*</span></li>
  <li class="listitem"><span class="simpara">eucJP-win*</span></li>
  <li class="listitem"><span class="simpara">SJIS-win*</span></li>
  <li class="listitem"><span class="simpara">ISO-2022-JP</span></li>
  <li class="listitem"><span class="simpara">ISO-2022-JP-MS</span></li>
  <li class="listitem"><span class="simpara">CP932</span></li>
  <li class="listitem"><span class="simpara">CP51932</span></li>
  <li class="listitem"><span class="simpara">SJIS-mac（别名：MacJapanese）</span></li>
  <li class="listitem"><span class="simpara">SJIS-Mobile#DOCOMO（别名：SJIS-DOCOMO）</span></li>
  <li class="listitem"><span class="simpara">SJIS-Mobile#KDDI（别名：SJIS-KDDI）</span></li>
  <li class="listitem"><span class="simpara">SJIS-Mobile#SOFTBANK（别名：SJIS-SOFTBANK）</span></li>
  <li class="listitem"><span class="simpara">UTF-8-Mobile#DOCOMO（别名：UTF-8-DOCOMO）</span></li>
  <li class="listitem"><span class="simpara">UTF-8-Mobile#KDDI-A</span></li>
  <li class="listitem"><span class="simpara">UTF-8-Mobile#KDDI-B（别名：UTF-8-KDDI）</span></li>
  <li class="listitem"><span class="simpara">UTF-8-Mobile#SOFTBANK（别名：UTF-8-SOFTBANK）</span></li>
  <li class="listitem"><span class="simpara">ISO-2022-JP-MOBILE#KDDI（别名：ISO-2022-JP-KDDI）</span></li>
  <li class="listitem"><span class="simpara">JIS</span></li>
  <li class="listitem"><span class="simpara">JIS-ms</span></li>
  <li class="listitem"><span class="simpara">CP50220</span></li>
  <li class="listitem"><span class="simpara">CP50220raw</span></li>
  <li class="listitem"><span class="simpara">CP50221</span></li>
  <li class="listitem"><span class="simpara">CP50222</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-1*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-2*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-3*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-4*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-5*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-6*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-7*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-8*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-9*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-10*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-13*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-14*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-15*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-16*</span></li>
  <li class="listitem"><span class="simpara">byte2be</span></li>
  <li class="listitem"><span class="simpara">byte2le</span></li>
  <li class="listitem"><span class="simpara">byte4be</span></li>
  <li class="listitem"><span class="simpara">byte4le</span></li>
  <li class="listitem"><span class="simpara">BASE64</span></li>
  <li class="listitem"><span class="simpara">HTML-ENTITIES（别名：HTML）</span></li>
  <li class="listitem"><span class="simpara">7bit</span></li>
  <li class="listitem"><span class="simpara">8bit</span></li>
  <li class="listitem"><span class="simpara">EUC-CN*</span></li>
  <li class="listitem"><span class="simpara">CP936</span></li>
  <li class="listitem"><span class="simpara">GB18030</span></li>
  <li class="listitem"><span class="simpara">HZ</span></li>
  <li class="listitem"><span class="simpara">EUC-TW*</span></li>
  <li class="listitem"><span class="simpara">CP950</span></li>
  <li class="listitem"><span class="simpara">BIG-5*</span></li>
  <li class="listitem"><span class="simpara">EUC-KR*</span></li>
  <li class="listitem"><span class="simpara">UHC（别名：CP949）</span></li>
  <li class="listitem"><span class="simpara">ISO-2022-KR</span></li>
  <li class="listitem"><span class="simpara">Windows-1251（别名：CP1251）</span></li>
  <li class="listitem"><span class="simpara">Windows-1252（别名：CP1252）</span></li>
  <li class="listitem"><span class="simpara">CP866（别名：IBM866）</span></li>
  <li class="listitem"><span class="simpara">KOI8-R*</span></li>
  <li class="listitem"><span class="simpara">KOI8-U*</span></li>
  <li class="listitem"><span class="simpara">ArmSCII-8（别名：ArmSCII8）</span></li>  
 </ul>
 <p class="para">
  * 表示该编码也可以在正则表达式中使用。
 </p>
 <p class="para">
  任何接受编码名称的 <var class="filename">php.ini</var> 条目同样也可以使用 &quot;<code class="literal">auto</code>&quot; 和 &quot;<code class="literal">pass</code>&quot; 的值。
  接受编码名的 <code class="literal">mbstring</code> 函数同样也可以使用值 &quot;<code class="literal">auto</code>&quot;。
 </p>
 <p class="para">
  如果设置了 &quot;<code class="literal">pass</code>&quot;，将不会对字符的编码进行转化。
 </p>
 <p class="para">
  如果设置了 &quot;<code class="literal">auto</code>&quot;，它将扩展成 <a href="mbstring.configuration.html" class="link">NLS</a> 中定义的每个字符编码列表。
  比如，假设 NLS 设置为 <code class="literal">Japanese</code>，值将会认为是 &quot;<code class="literal">ASCII,JIS,UTF-8,EUC-JP,SJIS</code>&quot;。
 </p>
 <p class="para">
  参见 <span class="function"><a href="function.mb-detect-order.html" class="function">mb_detect_order()</a></span>
 </p>
</div>
</div></div></body></html>